package com.wfs.spring.thread.t232;

/**
 * @Auther: wfs
 * @Date: 2019/6/12 20:25
 * @Description:
 */
public class RunThread extends Thread {
    private volatile  boolean isRunning=true;

    public boolean isRunning() {
        return isRunning;
    }

    public void setRunning(boolean running) {
        isRunning = running;
    }

    @Override
    public void run() {
        System.out.println("进入run");
        while (isRunning){

        }
        System.out.println("线程停止");
    }
}
